//
//  AppViewCell.swift
//  TrafficViolation
//
//  Created by clover on 2017/4/11.
//  Copyright © 2017年 eaglelive. All rights reserved.
//

import UIKit

class AppViewCell : UICollectionViewCell {
    var title = UILabel()
    var appBtn = UIButton()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        let itemW = kScreenW / 4
        appBtn = UIButton(frame: CGRect.init(x: (itemW - 50) / 2, y: 5, width: 50, height: 50))
        self.contentView.addSubview(appBtn)
        
        title = UILabel.init(frame: .init(x: (itemW - 60) / 2, y: 60, width: 60, height: 20))
        title.textAlignment = .center // 标题居中显示
        title.font = UIFont.systemFont(ofSize: 10) //设置标题字体大小
        self.contentView.addSubview(title)
        self.backgroundColor = UIColor.white
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
